home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Format Collection 21
/
PC Format CD-ROM Collection 21 (1995-12)(Future Publishing)(GB)[issue 51].iso
/
resource
/
rays.poc
< prev
next >
Wrap
Text File
|
1990-08-02
|
416b
|
34 lines
// rays - wait for pen click then draw lines connecting the initial point to
// point where pen is down.
do_rays(int xc,int yc)
{;
int x,y;
int l,r,k;
for (;;)
{
if (!RubLine(xc,yc,&x,&y))
break;
do
{
Line(xc,yc,x,y);
PollInput(&x,&y,&l,&r,&k);
}
while (l);
}
}
main()
{
int x,y,l,r,k;
for (;;)
{
WaitClick(&x,&y,&l,&r,&k);
if (!l)
break;
else
do_rays(x,y);
}
}